<!-- header -->

<%
	String redirect = (String) request.getAttribute("redirected_from_home");
	if( redirect == null || !redirect.equalsIgnoreCase("true") ) {		
		response.sendRedirect("/writeonproject/home");
	}
%>

<% 
	String listid = request.getParameter("listid");
	if (listid == null) {
    	response.sendRedirect("/writeonproject/home");
	}

	String user = (String) request.getAttribute("userid");
%>

<jsp:include page="header.jsp">
	<jsp:param name="title" value="Storylist:"/>
</jsp:include>
<!-- / header -->
<script type="text/javascript" src="js/updates.js"></script>
<script type="text/javascript" src="js/storylist.js"></script>
<script type="text/javascript">checkIfUserIsOwner(user, listid);</script>
<script> window.onload=storylistUpdateInit;</script>

<!-- content -->
	<div class="body7">
		<div class="main">
			<section id="content">
				<div class="wrapper">
					<article>
						<div class="pad1">
							<h2 id="storylist_title"></h2>
							<br><br>
							<table class="storylist_names" id="storylisttable">
								<thead>
									<tr>
										<th class="story_col1 left_col">Story Title</th>										
										<th class="story_col2 left_col">Creator</th>
										<th class="story_col3">Posts</th>
										<th class="story_col4 left_col">Last Post</th>
									</tr>
								</thead>
								
								<%= "<input type=\"hidden\" id=\"listid\" value=\"" + listid + "\">" %>
								<tbody id="storylistbody">
								</tbody>
							</table>
							<div id="nostories"></div>
						</div>
					</article>
				</div>
			</section>
		</div>
	</div>
	<!-- / content -->

<!-- footer -->
<jsp:include page="footer.jsp"/>
<!-- / footer -->
